<h2>后台权限&gt;导入资源</h2>

<form method='post' action="<?= AdminController::_makeURL('admin', 'priv', 'import')?>">
<input type='submit' value='导入'>
</form>

<table class="list" cellpadding="0" cellspacing="0">
	<thead>
		<td>id</td>
		<td>说明</td>
		<td>app</td>
		<td>controller</td>
		<td>action</td>
		<td>&nbsp;</td>
	</thead>
	<? foreach($this->ret['data'] as $i=>$row):?>
	<? 
	if($i!=0 and $row['app']!=$this->ret['data'][$i-1]['app']){
		$app_diff = true;
	}else{
		$app_diff = false;
	}
	if($i==0){
		$controllerCss = 0;
	}elseif($row['app']==$this->ret['data'][$i-1]['app']){
		if($row['controller']!=$this->ret['data'][$i-1]['controller']){
			$controllerCss++;
		}
	}else{
		$controllerCss = 0;
	}
	?>

	<tr class="<?= $app_diff?'app':''?> controller_<?= $controllerCss?>">
		<td><?= $row['id']?></td>
		<td><?= $row['description']?></td>
		<td><?= $row['app']?></td>
		<td><?= $row['controller']?></td>
		<td><?= $row['action']?></td>
		<td>		
		<a href='<?= AdminController::_makeURL('admin', 'priv', 'delete_resource', array('id'=>$row['id']))?>'>删除</a>
		</td>
	</tr>
	<? endforeach;?>
</table>